package com.mali.backendcommon.rpc;

import com.mali.backendcommon.common.Result;
import com.mali.malibackendmodel.dto.ProductAddDTO;
import com.mali.malibackendmodel.dto.ProductEditDTO;
import com.mali.malibackendmodel.dto.ProductQueryDTO;
import com.mali.malibackendmodel.pojo.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mali.malibackendmodel.vo.PageVO;
import com.mali.malibackendmodel.vo.ProductDetailsQueryVO;
import com.mali.malibackendmodel.vo.ProductQueryVO;

import java.time.LocalDateTime;


/**
* @author 132993
* @description 针对表【product(商品)】的数据库操作Service
* @createDate 2024-06-16 10:48:34
*/

public interface ProductService extends IService<Product> {


    Result<PageVO<ProductQueryVO>> productPageQuery(Long page, Long size, ProductQueryDTO productQueryDTO);

    Result<ProductDetailsQueryVO> productDetailsById(Long productId);
    Result verifyRequest(Long productId);

    Result verifyPass(Long productId);

    Result verifyUnpass(Long productId);

    Result line(Long productId, Integer status);

    void productOnAndDownLine();

    boolean haveAuthority(Long productId,Long userId);

    Long getAdminUserIdByProductId(Long productId);

    Result addProductAndPrice(ProductAddDTO productAddDTO);

    Result updateProductAndPrice(ProductEditDTO productEditDTO);

    void downLine(Product product);
}
